package com.Brave.manager.Demo06;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;

public class Service {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket(10088);

        while (true){

            byte[] bys = new byte[1024];

            DatagramPacket dp = new DatagramPacket(bys,bys.length);

            ds.receive(dp);

            System.out.println("解析数据：" + new String(dp.getData(),0,dp.getLength()));
        }


    }
}
